<!DOCTYPE html>
<!--[if lt IE 7 ]> <html class="ie ie6 no-js" <?php language_attributes(); ?>> <![endif]-->
<!--[if IE 7 ]> <html class="ie ie7 no-js" <?php language_attributes(); ?>> <![endif]-->
<!--[if IE 8 ]> <html class="ie ie8 no-js" <?php language_attributes(); ?>> <![endif]-->
<!--[if IE 9 ]> <html class="ie ie9 no-js" <?php language_attributes(); ?>> <![endif]-->
<!--[if gt IE 9]><!--><html class="no-js" <?php language_attributes(); ?>><!--<![endif]-->

<?php
global $up_options;
//print '<pre>'; print_r($up_options); print '</pre>';
?>

<?php /** note: the "no-js" class is for Modernizr. */ ?>
<head id="www-sitename-com" data-template-set="html5-reset-wordpress-theme" profile="http://gmpg.org/xfn/11">
    <meta charset="<?php bloginfo('charset'); ?>">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <!-- Always force latest IE rendering engine (even in intranet) & Chrome Frame -->
    <?php if (is_search()) { ?>
    <meta name="robots" content="noindex, nofollow" /> 
    <?php } ?>

    <title><?php 
    if (function_exists('is_tag') && is_tag()) {
        single_tag_title("Tag Archive for &quot;"); echo '&quot; - '; }
    elseif (is_archive()) {
        wp_title(''); echo ' Archive - '; }
    elseif (is_search()) {
        echo 'Search for &quot;'.wp_specialchars($s).'&quot; - '; }
    elseif (!(is_404()) && (is_single()) || (is_page())) {
        wp_title(''); echo ' - '; }
    elseif (is_404()) {
        echo 'Not Found - ';
    }
    if (is_home()) {
        bloginfo('name'); echo ' - '; bloginfo('description'); }
    else {
        bloginfo('name');
    }
    if ($paged>1) {
        echo ' - page '. $paged;
    }
    ?></title>
    <meta name="title" content="<?php
    if (function_exists('is_tag') && is_tag()) {
        single_tag_title("Tag Archive for &quot;"); echo '&quot; - ';
    }elseif (is_archive()) {
        wp_title(''); echo ' Archive - ';
    }elseif (is_search()) {
        echo 'Search for &quot;'.wp_specialchars($s).'&quot; - ';
    }elseif (!(is_404()) && (is_single()) || (is_page())) {
        wp_title(''); echo ' - ';
    }elseif (is_404()) {
        echo 'Not Found - '; 
    }
    if (is_home()) {
        bloginfo('name'); echo ' - '; bloginfo('description');
    }else {
        bloginfo('name');
    }
    if ($paged>1) {
        echo ' - page '. $paged;
    }
    ?>">
    <meta name="description" content="<?php bloginfo('description'); ?>">
    <meta name="google-site-verification" content="">
    <?php /** Speaking of Google, don't forget to set your site up: http://google.com/webmasters */ ?>
    <meta name="author" content="X3box Solutions">
    <meta name="Copyright" content="Copyright Your Name Here 2011. All Rights Reserved.">
    <?php /** Dublin Core Metadata : http://dublincore.org/ */ ?>
    <meta name="DC.title" content="Project Name">
    <meta name="DC.subject" content="What you're about.">
    <meta name="DC.creator" content="X3box Solutions">

    <!--
    /** Mobile Viewport meta tag
    * j.mp/mobileviewport & davidbcalhoun.com/2010/viewport-metatag 
    * device-width : Occupy full width of the screen in its current orientation
    * initial-scale = 1.0 retains dimensions instead of zooming out if page height > device height
    * maximum-scale = 1.0 retains dimensions instead of zooming in if page width < device width 
    * uncomment below to use
    */ 
    -->
    <!--
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
    -->

    <!--
    /** This is the traditional favicon.
    * size: 16x16 or 32x32
    * transparency is OK
    * see wikipedia for info on browser support: http://mky.be/favicon/
    * it is recommended that favicon is placed at /, transfer when the site is live
    */
    -->
    <link rel="shortcut icon" href="<?php bloginfo('template_directory'); ?>/images/favicon.ico">

    <!--
    /** The is the icon for iOS's Web Clip.
    * size: 57x57 for older iPhones, 72x72 for iPads, 114x114 for iPhone4's retina display (IMHO, just go ahead and use the biggest one)
    * To prevent iOS from applying its styles to the icon name it thusly: apple-touch-icon-precomposed.png
    * Transparency is not recommended (iOS will put a black BG behind the icon)
    */
    -->
    <link rel="apple-touch-icon" href="<?php bloginfo('template_directory'); ?>/images/apple-touch-icon.png">

    <!-- /** CSS: screen, mobile & print are all in the same file */ -->
    <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>">
    
    <!-- /** CSS: taken from ES Template  */ -->
    <link rel="stylesheet" href="<?php bloginfo('template_directory'); ?>/style.parent.css">
    
    <?php
    /*
    [layout_homepage] =>  [layout_innerpage] =>  
    [layout_archive] =>  [layout_category] =>  
    [layout_post] =>  [layout_author] =>  
    [layout_search] =>  [layout_tag] => 
    */
    if (function_exists('is_tag') && is_tag()) {
        //Tag page
        $layout_css = $up_options->layout_tag;
    }elseif (is_archive()) {
        //Archive page
        $layout_css = $up_options->layout_archive;
    }elseif (is_search()) {
        //Search page
        $layout_css = $up_options->layout_search;
    }elseif (!(is_404()) && (is_single()) || (is_page())) {
        //Single and Page
        $layout_css = $up_options->layout_innerpage;
    }elseif (is_404()) {
        //404 page
        $layout_css = $up_options->layout_innerpage;
    }
    
    if (is_home()) {
        //homepage
        $layout_css = $up_options->layout_homepage;
    }
    
    if($layout_css){
        ?>
        <link rel="stylesheet" href="echo $layout_css ?>">
        <?php 
    } ?>
    <!-- /** all our JS is at the bottom of the page, except for Modernizr. */ -->
    <script src="<?php bloginfo('template_directory'); ?>/_/js/modernizr-1.7.min.js"></script>

    <link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />

    <?php if ( is_singular() ) wp_enqueue_script( 'comment-reply' ); ?>

    <?php wp_head(); ?>

</head>

<body <?php body_class(); ?>>
        
    <div id="main"><!-- /** not needed? up to you: http://camendesign.com/code/developpeurs_sans_frontieres */ -->

        <header id="header">
            <div id="header-left">
            <?php if($up_options->logo){ ?>
            <div class="description"><?php bloginfo('description'); ?></div>
            <a id="logo" href="<?php echo home_url(); ?>"><img src="<?php if($up_options->logo) echo $up_options->logo;?>" alt="<?php esc_attr( bloginfo( 'name' ) ); ?>"></a>
            <?php }else{ ?>
            <h1><a href="<?php echo get_option('home'); ?>/"><?php bloginfo('name'); ?></a></h1>
            <?php } ?>
            </div>
            
            <div id="header-right"><?php echo $up_options->header_phone_number?></div>
            <br class="clear" />            
            <nav id="access" role="navigation">
                <?php wp_nav_menu( array( 'menu' => 'navigation' ) ); ?>
            </nav><!-- #access -->
            
            <?php if (is_home()): ?>
            <div id="slideshow">This is where the slideshow appears:
            <?php
            echo 'homepage_slide_1_image: '.$up_options->homepage_slide_1_image.'<br />';
            echo 'homepage_slide_1_html: '.$up_options->homepage_slide_1_html.'<br />';
            echo 'homepage_slide_1_link: '.$up_options->homepage_slide_1_link.'<hr />';
            
            echo 'homepage_slide_2_image: '.$up_options->homepage_slide_2_image.'<br />';
            echo 'homepage_slide_2_html: '.$up_options->homepage_slide_2_html.'<br />';
            echo 'homepage_slide_2_link: '.$up_options->homepage_slide_2_link.'<hr />';
            
            echo 'homepage_slide_3_image: '.$up_options->homepage_slide_3_image.'<br />';
            echo 'homepage_slide_3_html: '.$up_options->homepage_slide_3_html.'<br />';
            echo 'homepage_slide_3_link: '.$up_options->homepage_slide_3_link.'<hr />';
            
            echo 'homepage_slide_4_image: '.$up_options->homepage_slide_4_image.'<br />';
            echo 'homepage_slide_4_html: '.$up_options->homepage_slide_4_html.'<br />';
            echo 'homepage_slide_4_link: '.$up_options->homepage_slide_4_link.'<hr />';
            
            echo 'homepage_slide_5_image: '.$up_options->homepage_slide_5_image.'<br />';
            echo 'homepage_slide_5_html: '.$up_options->homepage_slide_5_html.'<br />';
            echo 'homepage_slide_5_link: '.$up_options->homepage_slide_5_link.'<hr />';
            
            echo 'homepage_slide_button: '.$up_options->homepage_slide_button.'<br />';
            
            ?>
            </div>
            <?php endif; ?>
        </header>
        
        